package com.lovo.config;

import com.alibaba.druid.pool.DruidDataSource;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.*;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import javax.sql.DataSource;

/**
 * @title 中央配置类
 * @author luo
 * @date 2020/11/17 10:41
 */
/**此注解代表该类为配置类*/
@Configuration
/**开启spring扫描*/
@ComponentScan(basePackages = "com.lovo")
/**使用切面代理目标类*/
@EnableAspectJAutoProxy(proxyTargetClass = true)
/**开启springmvc注解*/
@EnableWebMvc
public class ApplicationConfig {

    /**
     * 注入json工具类
     *
     * @return json工具类
     */
    @Bean
    public ObjectMapper objectMapper() {
        return new ObjectMapper();
    }


}

